<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="dto.ArticuloDTO"%>
<%@ page import= "java.util.Iterator"%>
<%@ page import= "java.util.List"%>

<html>
<head>
	<title>Lista de Articulos</title>
</head>
<body>
<form action="ControladorArticulo?action=displaylist" method="post" >
	
		<input type="text" name="word"   placeHolder="Palabra">
		<select name="filter">
			<option selected>deposito
			<option>codigo
			<option>descripcion
		</select>
		<input type="submit" name="submit" value="Ingresar">
</form>
	
<table cellspacing="3" cellpadding="3" border="1" width="500">
	<tr>
		<td colspan="4"><b>Lista de Articulos</b></td>
	</tr>
	<tr>
		<td><b>Id</b></td>
		<td><b>Codigo</b></td>
		<td><b>Descripcion</b></td>
		<td><b>Deposito</b></td>
		
		
		
	</tr>
<%
	ArticuloDTO aux;
	Integer id; 	
	List<ArticuloDTO> articulos = (List<ArticuloDTO>)request.getAttribute("articulos");
	for(Iterator<ArticuloDTO> i = articulos.iterator(); i.hasNext();)
	{
		aux = i.next();
		id = aux.getId();
%>
	<tr>
	
		<td><%=aux.getId()%></td>	
 		<td><%=aux.getCodigo()%></td>
 		<td><%=aux.getDescripcion()%></td>
		<td><%=aux.getDeposito()%></td>
		
	
		
		
	</tr>
<% } %>

</table>
</body>
</html>